package com.marchsoft.musicalstore.service;

import com.marchsoft.musicalstore.entity.CourseType;
import com.marchsoft.musicalstore.repository.CourseTypeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 源
 * Date: 2019-11-20
 * Time: 15:25
 */
@Service
public class CourseTypeSer {
    @Autowired
    CourseTypeRepository courseTypeRepository;


    /**默认查的是0状态，就是可用状态
     *
     * @return
     */
    public List<CourseType> getAllCourseType(){
        List<CourseType> courseTypeByState = courseTypeRepository.findCourseTypeByState(0);
        return courseTypeByState;
    }


}
